﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Status.aspx.cs" Inherits="Workflow.Create" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <%--<link href="Css/css.css" rel="stylesheet" type="text/css" />--%>
    <link type="text/css" rel="stylesheet" href="css/pagination.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    
    <script type="text/javascript" src="Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="Scripts/Pageination.js"></script>
    <script type="text/javascript">
        //$(document).ready(function () {
           
        //});
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%--<div class="definewidth m10">
            <input id="button1" class="btn btn-primary" type="submit" name="button1" value="新建工作流" onclick="openWin('AddInfo.aspx',720,500)" runat="server"/>
        </div>--%>
        
    </div>
    <div>
        
         <table class="table table-bordered definewidth m10"><%-- --%>
            <thead>
                <% for (int j = 0; j < resultList.Count; ) %>
                <% { %>
                    <tr>
                    <th>工作流序号</th>
                    <th>工作流名称</th>
                     <%if (resultList[j].StatusDefine != 100) {%>
                    <th>当前状态</th>
                    <%}%>
                    <th>标题</th>
                    <th>创建时间</th>
                    <th>紧急程度</th>
                    <%if (resultList[j].StatusDefine == 0) {%>
                            <th>退回原因</th>
                    <%} %>

                    <%if (resultList[j].StatusDefine == 1 || resultList[j].StatusDefine == -1)
                       {%>
                            <th>是否暂停</th>
                    <%} %>
                    <th></th>
                    <%if (resultList[j].StatusDefine == 0) {%>
                        <th></th>
                    <%} %>
                    <%if (resultList[j].StatusDefine != 100){%>
                        <th></th>
                    <% }%>
                    <th></th>
                </tr>
                    <% break; %>
                <% }%>
                
            </thead>
            <tbody id="Searchresult"></tbody>
            <tbody id="hiddenresult" style="display:none">
                <% for (int i = 0; i < resultList.Count; i++) {%>
                <tr class="result">
                    <td><% =resultList[i].WorkParentId %></td>
                    <td><% =resultList[i].WorkName %></td>

                    <%if (resultList[i].StatusDefine!=100) {%>
                        <%if (resultList[i].StatusDefine==-1) {%>
                            <td><% =resultList[i].StatusNo %> / <% =resultList[i].NodeCount %><%=resultList[i].NodeName %></td>
                        <%} else {%>
                            <td><% =resultList[i].StatusNo %> / <% =resultList[i].NodeCount %></td>
                        <%} %>
                    <%} %>

                    <td><% =resultList[i].Content %></td>
                    <td><% =resultList[i].CreateTime %></td>
                    <td><% =resultList[i].Critical %></td>

                    <%if (resultList[i].StatusDefine == 0){%>
                        <%if (resultList[i].ParentReturnReason!="")
                          {%>
                            <td class="redColor"><% =resultList[i].ParentReturnReason %></td>
                        <%} else{%>
                            <td><% =resultList[i].ParentReturnReason %></td>
                        <%}%>
                    <%}%>
                    <%if (resultList[i].StatusDefine == 1 || resultList[i].StatusDefine == -1)
                       {%>
                        <%if (resultList[i].StatusDefine == -1)
                           {%>
                                <td class="yellowColor"><% =resultList[i].PauseName %>已暂停</td>
                        <%} else{%>
                                <td>否</td>
                         <%} %>
                    <%} %>
                    <td><a  href="#" onclick="DetailUrl('<% =resultList[i].WebName %>',<%= resultList[i].WorkParentId %>)">详情</a></td>

                    <%if (resultList[i].StatusDefine==0) {%>
                        <td><a href="#" onclick="Submit(<%= resultList[i].WorkParentId %>,<%=resultList[i].StatusNo %>)"><img src="Images/gif-0790.gif" title="提交"/></a></td>
                    <%} %>

                    <%if (resultList[i].StatusDefine!=100) {%>
                        <td><a id="<%= resultList[i].WorkParentId %>" href="#" onclick="Close(<%= resultList[i].WorkParentId %>)"><img src="Images/cross.png" title="关闭"/></a></td>
                    <% }%>

                    <td><a href="#" onclick="UpLoad(<%= resultList[i].WorkParentId %>)"><img src="Images/176.png" title="上传下载" /></a></td>
                </tr>
                <% }%>
            </tbody>
             
         </table>
         <div id="Pagination" class="pagination definewidth m10"></div>
    </div>
    </form>
    <script type="text/javascript" src="Scripts/MyJquery.js"></script>
</body>
</html>
